package item;

import loadsave.Memento;
import loadsave.loadsaveobject.LoadSaveObject;
import loadsave.loadsaveobject.LoadSaveObjectComposite;
import inventory.EquipLocation;
import visitors.ItemVisitor;
import visitors.TakeableItemVisitor;

public class Mount extends EquipableItem  {
    
    public Mount( String name, String activeSkillName ) {
        super(name);
        setEquipLocation(EquipLocation.MOUNT);
        setActiveSkillName(activeSkillName);
    }
    
    /**
     * have the visitor visit this item to pick it up
     */
	public void accept(TakeableItemVisitor visitor) {
		visitor.visitMount(this);
	}
	
	public void accept( ItemVisitor visitor ) {
		visitor.visitMount( this );
	}
	
   @Override
    public Memento getMemento() {
        return new Memento() {

            @Override
            public LoadSaveObject getState() {
                LoadSaveObject lso = Mount.super.getMemento().getState();
                lso.setType("Mount");
                return lso;
            }

            @Override
            public void restoreState(LoadSaveObject lso) {
                Mount.super.getMemento().restoreState(lso);
            }
            
        };
    }
   
	public Mount() { }
    
	@Override
	public Mount clone() {
		Mount toReturn = new Mount();
		toReturn.getMemento().restoreState(this.getMemento().getState());
		return toReturn;
	}
}
